<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="html"/>

	<xsl:template match="/">
		<html>
			<head>
				<style type="text/css" media="print">
				body { margin:0 0 0 0;zoom: .7; }
				table{TABLE-LAYOUT: auto; BORDER-COLLAPSE: collapse}
				.noprint{display:none;}
				</style>
<style type="text/css" media="screen">body{
body { margin:0 0 0 0; }
margin:0 0 0 0;
font-family:arial;
font-size:8px;
}
#boxnota{
border:solid 1px #000;
text-align:center;
width:40px;
FONT-WEIGHT: bold; 
}

.TDTrimestre table tr td#boxnota{
border:none;
width:160px;
}
.tbAlumno{
 BORDER-COLLAPSE: collapse;
 background-color: #732808; 
 width:100%;
 height:50px;
 border:solid 5px #732808;
}
.TDTitle {
	/*BORDER-RIGHT: #c7c8ca 2px solid; 
	BORDER-TOP: #c7c8ca 2px solid; BORDER-LEFT: #c7c8ca 2px solid; COLOR: #ffffff; BORDER-BOTTOM: #c7c8ca 2px solid; BACKGROUND-COLOR: #732808; 
	*/
	TEXT-ALIGN: left;
	
}
.TDNombre {
	FONT-WEIGHT: bold; 
	
	COLOR: #ffffff; 
	BACKGROUND-COLOR: #c6c6c6;
	WIDTH: 160px;
	text-align:center;
}
.TDAlumno{
	FONT-WEIGHT: bold; 
	font-size:28px;
	COLOR: white; 
	TEXT-ALIGN: center
}
.TDNombreMateria {
 border:solid 1px #c3c3c3;
	FONT-WEIGHT: bold; 
	BACKGROUND-COLOR: #e0e2e1; 
	TEXT-ALIGN: center;
	width:200px;
}
.TDNotas {
	BORDER: #732808 2px solid; 
	
	BACKGROUND-COLOR: #e0e1e3
	text-align:center;
	width:100px;

}
.TDNotasSPACE {
	BORDER: #732808 2px solid; 
	FONT-SIZE: 10px; 
	HEIGHT: 40px; BACKGROUND-COLOR: #732808
}
.TDQuincena {
	FONT-WEIGHT: bold; 
	COLOR: white; 
	BACKGROUND-COLOR: #732808; TEXT-ALIGN: center;
	BORDER: #732808 2px solid; 
	font-size:10px;
}

.TDTrimestre,.TDResumen  {
	text-align:center;
	FONT-WEIGHT: bold; 
	HEIGHT: 40px; 
	BACKGROUND-COLOR: #f0e1e3;
	BORDER: solid 2px #732808 ;
	border-bottom:solid 9px #732808 ; 
	border-top:solid 9px #732808 ; 
	nowrap:nowrap;
		
	
}
.TDResumen {
	
	HEIGHT: 40px; BACKGROUND-COLOR:#E0C2C7;
	BORDER: #732808 2px solid; 
	width:200px;
	nowrap:nowrap;
	
}
.Bt {
	BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; CURSOR: hand; BORDER-BOTTOM: 0px
}
.n1,.n2,.n3,.n4,.n5,.n6,.n7,.n8,.n9,.n10{		text-align:center;}
.n1,.n2,.n3{	color:red;	}
.n4,.n5{	color:green;}
.n6,.n7,.n8,.n9,.n10{	color:blue;	}</style>


				<style type="text/css" media="print">body{
margin:0 0 0 0;
font-family:arial;
font-size:60px;
}
#boxnota{
border:solid 1px #000;
text-align:center;
font-size:50px;
width:40px;
FONT-WEIGHT: bold; 
}

.TDTrimestre table tr td#boxnota{
border:none;
width:160px;
font-size:50px;
}
.tbAlumno{
 BORDER-COLLAPSE: collapse;
 background-color: #732808; 
 width:100%;
 height:50px;
 border:solid 5px #732808;
}
.TDTitle {
	/*BORDER-RIGHT: #c7c8ca 2px solid; 
	BORDER-TOP: #c7c8ca 2px solid; BORDER-LEFT: #c7c8ca 2px solid; COLOR: #ffffff; BORDER-BOTTOM: #c7c8ca 2px solid; BACKGROUND-COLOR: #732808; 
	*/
	TEXT-ALIGN: left;
	
}
.TDTitle img{
zoom:3;
}

.TDNombre {
	FONT-WEIGHT: bold; 
	FONT-SIZE: 30px; 
	COLOR: #ffffff; 
	BACKGROUND-COLOR: #c6c6c6;
	WIDTH: 160px;
	text-align:center;
}
.TDAlumno{
	FONT-WEIGHT: bold; 
	FONT-SIZE: 50px; 
	COLOR: white; 
	TEXT-ALIGN: center
}
.TDNombreMateria {
	font-size:40px;
	FONT-WEIGHT: bold; 
	BACKGROUND-COLOR: #e0e2e1; 
	TEXT-ALIGN: center;
	width:200px;
	border:solid 1px #c3c3c3;

}
.TDNotas {
	BORDER: #732808 2px solid; 
	FONT-SIZE: 12px;  
	BACKGROUND-COLOR: #e0e1e3
	text-align:center;
	width:100px;

}
.TDNotasSPACE {
	BORDER: #732808 2px solid; 
	FONT-SIZE: 10px; 
	HEIGHT: 40px; BACKGROUND-COLOR: #732808
}
.TDQuincena {
	FONT-WEIGHT: bold; 
	COLOR: white; 
	BACKGROUND-COLOR: #732808; TEXT-ALIGN: center;
	BORDER: #732808 2px solid; 
	height:80px;
	font-size:40px;
}

.TDTrimestre,.TDResumen  {
	text-align:center;
	FONT-WEIGHT: bold; 
	BACKGROUND-COLOR: #f0e1e3;
	BORDER: solid 2px #732808 ;
	border-bottom:solid 9px #732808 ; 
	border-top:solid 9px #732808 ; 
	nowrap:nowrap;
	height:100px;
	font-size:40px;
}
.TDResumen {
	BACKGROUND-COLOR:#E0C2C7;
	BORDER: #732808 2px solid; 
	width:200px;
	nowrap:nowrap;
	font-size:40px;
	
}
.Bt {
	BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; CURSOR: hand; BORDER-BOTTOM: 0px
}
.n1,.n2,.n3,.n4,.n5,.n6,.n7,.n8,.n9,.n10{		text-align:center;}
.n1,.n2,.n3{	color:red;	}
.n4,.n5{	color:green;}
.n6,.n7,.n8,.n9,.n10{	color:blue;	}</style>




				<style type="text/css" media="screen">DIV#tbl-container {
	OVERFLOW: auto; WIDTH: 980px; HEIGHT: 500px
}
TABLE {
	TABLE-LAYOUT: auto; BORDER-COLLAPSE: collapse
}

THEAD TH {
	BORDER-RIGHT: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 10px; 
	POSITION: relative; TEXT-ALIGN: center
}
THEAD TH.locked {
	BORDER-RIGHT: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 10px; 
	 POSITION: relative; TEXT-ALIGN: center
}
THEAD TH {
	Z-INDEX: 20; 
	TOP: expression(document.getElementById("tbl-container").scrollTop-2)
}
THEAD TH.locked {
	Z-INDEX: 30; 
}
TD.locked {
	Z-INDEX: 10;
	LEFT: expression(parentNode.parentNode.parentNode.parentNode.scrollLeft); 
	POSITION: relative;
	


}
TH.locked {
	Z-INDEX: 10; 
	LEFT: expression(parentNode.parentNode.parentNode.parentNode.scrollLeft); 
	POSITION: relative
}</style>
			</head>
			<body>
				<table>
					<tbody>
						<tr>
							<td class="TDTitle">
								<img src="../images/iis-banner.jpg"/>
							</td>
						</tr>
						<tr>
							<td>
								<xsl:apply-templates select="alumno"/>
							</td>
						</tr>
						<tr>
							<td>
								<div id="tbl-container">
									<xsl:call-template name="planilla"/>
								</div>
							</td>
						</tr>
					</tbody>
					<tfoot>
					
					</tfoot>
				</table>
			</body>
		</html>
	</xsl:template>


	<!--- HEAD ALUMNO -->
	<xsl:template match="alumno">
		<table class="tbAlumno">
			<tbody>
				<tr>
					<td class="TDNombre">Nombre Alumno</td>
					<td class="TDAlumno">
						<xsl:value-of select="@nombre"/>
					</td>
					<td class="TDNombre" style="width: 37px">Año</td>
					<td class="TDAlumno">
						<xsl:value-of select="@Anio"/>
					</td>
					<td class="TDNombre" style="width: 37px">División</td>
					<td class="TDAlumno">
						<xsl:value-of select="@Curso"/>
					</td>
				</tr>
			</tbody>
		</table>
	</xsl:template>
	<!--- HEAD ALUMNO -->


	<!--notas-->
	<xsl:template name="planilla">
		<table id="tbl">
			<thead>
				<th class="locked TDNombreMateria">
					<div>&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</div>
				</th>
				<xsl:apply-templates select="alumno/Materias/Materia[@Tipo=1]"/>
				<th class="TDNotasSPACE">&#xA0;</th>
				<xsl:apply-templates select="alumno/Materias/Materia[@Tipo=2]"/>
			</thead>
			<tbody>

				<xsl:apply-templates select="alumno/Periodos/Periodo"/>
				<xsl:apply-templates select="alumno/Periodos/Resumen"/>
			</tbody>
		</table>
	</xsl:template>

	<!--materias-->
	<xsl:template match="Materia">
		<th class="TDNombreMateria">
			<div style="width:190px;">
				<xsl:value-of select="@Nombre"/>
			</div>
		</th>
	</xsl:template>

	<!--Periodos-->
	<xsl:template match="Periodo">
		<xsl:variable name="idper">
			<xsl:value-of select="@IdPeriodo"/>
		</xsl:variable>
		<xsl:variable name="idEstilo">
			<xsl:value-of select="@Estilo"/>
		</xsl:variable>
		<tr>
			<td>
				<xsl:attribute name="class">locked <xsl:value-of select="@Estilo"/></xsl:attribute>
				<xsl:choose>
					<xsl:when test="@FechaHasta=''">
						<xsl:value-of select="@FechaDesde"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="@Particion"/>
						<br/>
						<xsl:value-of select="@FechaDesde"/>al <xsl:value-of select="@FechaHasta"/></xsl:otherwise>
				</xsl:choose>
			</td>
			<xsl:call-template name="GrupoNotas">
				<xsl:with-param name="idEstilo">
					<xsl:value-of select="$idEstilo"/>
				</xsl:with-param>
				<xsl:with-param name="idPer">
					<xsl:value-of select="$idper"/>
				</xsl:with-param>
				<xsl:with-param name="tipo">1</xsl:with-param>
			</xsl:call-template>
			<td class="TDNotasSPACE">
			</td>
			<xsl:call-template name="GrupoNotas">
				<xsl:with-param name="idEstilo">
					<xsl:value-of select="$idEstilo"/>
				</xsl:with-param>
				<xsl:with-param name="idPer">
					<xsl:value-of select="$idper"/>
				</xsl:with-param>
				<xsl:with-param name="tipo">2</xsl:with-param>
			</xsl:call-template>
		</tr>
		<tr>
		</tr>
	</xsl:template>

	<xsl:template match="Resumen">
		<tr>
			<td class="locked TDResumen">
				<xsl:value-of select="@Nombre"/>
			</td>
			<xsl:for-each select="materia[@tipomateria=1]">
				<td class="TDResumen">&#xA0;</td>
			</xsl:for-each>
			<td class="TDNotasSPace">&#xA0;</td>
			<xsl:for-each select="materia[@tipomateria=2]">
				<td class="TDResumen">&#xA0;</td>
			</xsl:for-each>
		</tr>
	</xsl:template>


	<xsl:template name="GrupoNotas">
		<xsl:param name="idPer"/>
		<xsl:param name="idEstilo"/>
		<xsl:param name="tipo"/>
		<xsl:for-each select="/alumno/Materias/Materia[@Tipo=$tipo]">
			<td class="TDNotas">
				<xsl:if test="$idEstilo='TDTrimestre'">
					<xsl:attribute name="class">
						<xsl:value-of select="$idEstilo"/>
					</xsl:attribute>
				</xsl:if>
				<xsl:variable name="idmate">
					<xsl:value-of select="@IdMateria"/>
				</xsl:variable>
				<!--tengo las notas-->
				<table align="center">
					<xsl:for-each select="/alumno/Periodos/Periodo[@IdPeriodo=$idPer and @Estilo=$idEstilo]/materia[@IdMateria=$idmate]/nota">
						<tr>
							<xsl:apply-templates select="modalidad"/>
						</tr>
					</xsl:for-each>
				</table>
			</td>
		</xsl:for-each>
	</xsl:template>

	<xsl:template match="modalidad">
		<td id="boxnota">
			<xsl:attribute name="class">n<xsl:value-of select="round(@nota)"/></xsl:attribute>
			<xsl:attribute name="title">
				<xsl:value-of select="../@Modalidad"/>/<xsl:value-of select="@observacion"/></xsl:attribute>
			<xsl:if test="@nota=0">&#xA0;</xsl:if>
			<xsl:if test="../@Modalidad=Promedio"></xsl:if>
			<xsl:if test="not(@nota=0)">
				<xsl:value-of select="@Letra"/>
			</xsl:if>
		</td>
	</xsl:template>
	<!--notas-->
	<xsl:template match="nota">
		<td>
			<xsl:value-of select="@nota"/>
		</td>
	</xsl:template>

	<xsl:template name="zoomprint">
		<input type="text" name="zoom" id="zoom" value="80"></input>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2004. Sonic Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="..\..\..\..\Temp\boletin.xml" htmlbaseurl="" outputurl="" processortype="internal" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition></MapperMetaTag>
</metaInformation>
-->